import Vue from 'vue'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import App from './App'
import router from './router'
import store from './store'
import * as filters from './filters' // 全局filter
import './icons' // icon
import './permission' // 权限

// import 'vx-easyui/dist/themes/default/easyui.css';
// import 'vx-easyui/dist/themes/icon.css';
// import 'vx-easyui/dist/themes/vue.css';
// import EasyUI from 'vx-easyui';
// 
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
// 
import roslibjs from './roslibjs/index.js'
import inraredRos from './roslibjs/inrared.js'
import robotPose from './roslibjs/robotPose.js'
import control from './roslibjs/control'

import publishAlarm from './utils/publishAlarm.js'
Vue.prototype.publishAlarm = publishAlarm

Vue.use(Element)

// Vue.use(EasyUI);
Vue.use(Viewer)
//
Vue.use(roslibjs)
Vue.use(inraredRos)
Vue.use(robotPose)
Vue.use(control)

// register global utility filters.
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: { App }
})